﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="attachedfiles.aspx.cs" Inherits="Sys_attachedfiles" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>所有附件</title>
    <link rel="stylesheet" type="text/css" href="../js/themes/default/easyui.css"/>
	<link rel="stylesheet" type="text/css" href="../js/themes/icon.css"/> 
   	<link rel="stylesheet" type="text/css" href="../CSS/Style.css"/>
    <script type="text/javascript" src="../js/jquery-1.4.2.min.js"></script> 
   	<script type="text/javascript" src="../js/jquery.easyui.min.js"></script>    
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
   <div style="background:#efefef;width:100%;">
		<a href="../Sys/announcement.aspx" target="mainwin" class="easyui-linkbutton" plain="true">附件相关</a>&nbsp;&nbsp;|
		<a href="#" class="easyui-linkbutton" plain="true">系统附件</a>&nbsp;&nbsp;|
		<a href="../Sys/dataimport.aspx" class="easyui-linkbutton" plain="true">数据导入</a>
	</div>	  	  
    <div>
        
  <div>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
           <div style="background-color:#fedcbd; padding:5px;">
               文件类型：<asp:DropDownList ID="ddlAttachType" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlAttachType_SelectedIndexChanged">
                   <asp:ListItem Selected="True" Value="0">所有</asp:ListItem>
                   <asp:ListItem Value="文档">文档（.doc,.docx）</asp:ListItem>
                   <asp:ListItem Value="表格">表格（.xls,.xlsx）</asp:ListItem>
                   <asp:ListItem>其他</asp:ListItem>
               </asp:DropDownList>
           </div>  
           <div style="background: #FFFCC9;border: 1px solid #FFD667;">
          <table cellpadding="0" cellspacing="0" style="width:100%;"><tr><td style="width:30px;"><img id="warning"  src="../Images/Warning.png" alt="提示" /></td>
          <td>提示：删除这里的附件只是删除了一条记录，附件并没有删除。</td>
          <td style="text-align:right;"> <asp:Button ID="btnDelete" runat="server" Text="删除全部" OnClick="btnDelete_Click" /></td></tr></table> 
           </div>  
                <asp:GridView ID="GridView1" runat="server" CssClass="gvStyle" AlternatingRowStyle-CssClass="alt" 
                PagerStyle-CssClass="pgr" AutoGenerateColumns="False" 
                Width="100%" Font-Bold="False" EmptyDataText="暂时没有任何数据！" OnRowCancelingEdit="GridView1_RowCancelingEdit" 
                EnableTheming="False" OnRowEditing="GridView1_RowEditing" OnRowUpdating="GridView1_RowUpdating" 
                DataKeyNames="id">
                    <Columns>
                        <asp:TemplateField>
                              <HeaderTemplate>
                               <asp:CheckBox ID="CheckBox_All" runat="server" Text="" AutoPostBack="true" OnCheckedChanged="CheckAll" />
                             </HeaderTemplate>
                            <ItemTemplate>
                                <asp:CheckBox ID="ItemBox" runat="server" />
                            </ItemTemplate>
                            <HeaderStyle Width="25px" />
                            <ItemStyle Width="20px" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="filename" HeaderText="文件名称" />
                        <asp:BoundField HeaderText="文件类型" DataField="filetype" ReadOnly="True" >
                            <ItemStyle Width="60px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="createdate" HeaderText="创建时间">
                            <ItemStyle Width="150px" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="附件">
                     <ItemTemplate>
                         <asp:HyperLink ID="hlattached" runat="server" ImageUrl='<%# strImage(Convert.ToString(Eval("filepath"))) %>'
                             NavigateUrl='<%# Eval("filepath") %>'></asp:HyperLink>
                     </ItemTemplate>
                             <ItemStyle Width="50px" />
                        </asp:TemplateField>
                        <asp:CommandField ShowEditButton="True" ButtonType="Image" CancelImageUrl="~/js/themes/icons/undo.png" EditImageUrl="~/js/themes/icons/pencil.png" UpdateImageUrl="~/js/themes/icons/filesave.png" HeaderText="操作" >
                            <ItemStyle Width="60px" />
                        </asp:CommandField>
                    </Columns>
                         <PagerStyle CssClass="pgr" />
                     <AlternatingRowStyle CssClass="alt" />
                </asp:GridView>
                <webdiyer:aspnetpager id="AspNetPager1" runat="server"
                        HorizontalAlign="Right" LastPageText="末页" NextPageText="下一页" 
                        PageIndexBoxType="TextBox" PageSize="15" PrevPageText="上一页" ShowCustomInfoSection="Left"
                        ShowPageIndexBox="Always" Width="100%" CustomInfoHTML="共<font color=blue><b>%RecordCount%</b></font>条数据 每页：<font color=blue><b>%PageSize%</b></font> 条 共<font color=blue><b>%PageCount%</b></font>页 当前页：<font color=red><b>%CurrentPageIndex%/%PageCount%</b></font>" OnPageChanged="AspNetPager1_PageChanged" CustomInfoSectionWidth="50%" FirstPageText="首页" AlwaysShow="True" CustomInfoTextAlign="Left">
                </webdiyer:aspnetpager>
            </ContentTemplate>
        </asp:UpdatePanel></div> 
    </div>
    </form>
</body>
</html>
